﻿//Author:Michal Sporna
//License: https://operationsneakpeek.codeplex.com/license

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Util.Classes
{
    /// <summary>
    /// Represents event
    /// </summary>
    public class Event
    {
        #region properties
        public string Method;
        public List<Classes.EventParameter> Parameters;
        public Util.Helpers.PublicEnums.EventType EventType;
        #endregion

        #region public fields
        public string EventTypeString;


        #endregion

        #region methods

        /// <summary>
        /// Default constructor
        /// </summary>
        public Event()
        {
            try
            {

                Parameters = new List<EventParameter>();
            }
            catch (Exception ex)
            {
                Util.ErrorLogging.LogError(ex);
                return;
            }

        }

        /// <summary>
        /// Convert event type string
        /// into enum
        /// </summary>
        public void ConvertEventTypeStringIntoEnum()
        {
            try
            {
                switch (EventTypeString)
                {
                    case "onAvatarSpotted":
                        {
                            this.EventType = Util.Helpers.PublicEnums.EventType.onAvatarSpotted;
                            this.EventTypeString = null;

                            break;
                        }
                }


            }
            catch (Exception ex)
            {
                Util.ErrorLogging.LogError(ex);
                return;
            }
        }

        #endregion



    }
}
